﻿<%@ Page Language="C#" MasterPageFile="../main.master" Inherits="VioletDevelopmentLaboratory.Net.Web.Configuration.VWebConfigManagerPage" %>

<script runat="server">
	protected void CompilationDetailsView_ItemUpdated(object sender, DetailsViewUpdatedEventArgs e)
	{
		ShowAlert_DetailsView_ItemUpdated(e);
	}
	
	
	
	
	
	
	
	protected void AssembliesGridView_SelectedIndexChanging(object sender, GridViewSelectEventArgs e)
	{
		AssembliesDetailsView.ChangeMode(DetailsViewMode.ReadOnly);
	}
	protected void AssembliesDetailsView_ItemInserted(object sender, DetailsViewInsertedEventArgs e)
	{
		ShowAlert_DetailsView_ItemInserted(e);

		AssembliesGridView.SelectedIndex = -1;
		AssembliesGridView.DataBind();
	}
	protected void AssembliesDetailsView_ItemDeleted(object sender, DetailsViewDeletedEventArgs e)
	{
		ShowAlert_DetailsView_ItemDeleted(e);

		AssembliesDetailsView.ChangeMode(DetailsViewMode.Insert);

		AssembliesGridView.SelectedIndex = -1;
		AssembliesGridView.DataBind();
	}







	protected void BuildProvidersGridView_SelectedIndexChanging(object sender, GridViewSelectEventArgs e)
	{
		BuildProvidersDetailsView.ChangeMode(DetailsViewMode.ReadOnly);
	}
	protected void BuildProvidersDetailsView_ItemInserted(object sender, DetailsViewInsertedEventArgs e)
	{
		ShowAlert_DetailsView_ItemInserted(e);

		BuildProvidersGridView.SelectedIndex = -1;
		BuildProvidersGridView.DataBind();
	}
	protected void BuildProvidersDetailsView_ItemUpdated(object sender, DetailsViewUpdatedEventArgs e)
	{
		ShowAlert_DetailsView_ItemUpdated(e);

		BuildProvidersGridView.SelectedIndex = -1;
		BuildProvidersGridView.DataBind();
	}
	protected void BuildProvidersDetailsView_ItemDeleted(object sender, DetailsViewDeletedEventArgs e)
	{
		ShowAlert_DetailsView_ItemDeleted(e);

		BuildProvidersDetailsView.ChangeMode(DetailsViewMode.Insert);

		BuildProvidersGridView.SelectedIndex = -1;
		BuildProvidersGridView.DataBind();
	}

	
	
	
	
	
	
	
	protected void CodeSubDirectoriesGridView_SelectedIndexChanging(object sender, GridViewSelectEventArgs e)
	{
		CodeSubDirectoriesDetailsView.ChangeMode(DetailsViewMode.ReadOnly);
	}

	protected void CodeSubDirectoriesDetailsView_ItemInserted(object sender, DetailsViewInsertedEventArgs e)
	{
		ShowAlert_DetailsView_ItemInserted(e);

		CodeSubDirectoriesGridView.SelectedIndex = -1;
		CodeSubDirectoriesGridView.DataBind();
	}

	protected void CodeSubDirectoriesDetailsView_ItemDeleted(object sender, DetailsViewDeletedEventArgs e)
	{
		ShowAlert_DetailsView_ItemDeleted(e);

		CodeSubDirectoriesDetailsView.ChangeMode(DetailsViewMode.Insert);

		CodeSubDirectoriesGridView.SelectedIndex = -1;
		CodeSubDirectoriesGridView.DataBind();
	}

	
	
	
	
	
	protected void ExpressionBuildersGridView_SelectedIndexChanging(object sender, GridViewSelectEventArgs e)
	{
		ExpressionBuildersDetailsView.ChangeMode(DetailsViewMode.ReadOnly);
	}
	protected void ExpressionBuildersDetailsView_ItemInserted(object sender, DetailsViewInsertedEventArgs e)
	{
		ShowAlert_DetailsView_ItemInserted(e);

		ExpressionBuildersGridView.SelectedIndex = -1;
		ExpressionBuildersGridView.DataBind();
	}
	protected void ExpressionBuildersDetailsView_ItemUpdated(object sender, DetailsViewUpdatedEventArgs e)
	{
		ShowAlert_DetailsView_ItemUpdated(e);

		ExpressionBuildersGridView.SelectedIndex = -1;
		ExpressionBuildersGridView.DataBind();
	}
	protected void ExpressionBuildersDetailsView_ItemDeleted(object sender, DetailsViewDeletedEventArgs e)
	{
		ShowAlert_DetailsView_ItemDeleted(e);

		ExpressionBuildersDetailsView.ChangeMode(DetailsViewMode.Insert);

		ExpressionBuildersGridView.SelectedIndex = -1;
		ExpressionBuildersGridView.DataBind();
	}
</script>

<asp:Content ID="Content1" ContentPlaceHolderID="BodyContentPlaceHolder" runat="server">

	<h2>Compilation</h2>

	<div>
		<asp:ObjectDataSource ID="CompilationDetailsViewDataSource" runat="server" 
			SelectMethod="GetCompilation" 
			TypeName="VioletDevelopmentLaboratory.Net.Web.Configuration.CompilationSectionManager" 
			UpdateMethod="ModifyCompilation">
			<UpdateParameters>
				<asp:Parameter Name="assemblyPostProcessorType" Type="String" />
				<asp:Parameter Name="batch" Type="Boolean" />
				<asp:Parameter Name="batchTimeout" Type="Object" />
				<asp:Parameter Name="debug" Type="Boolean" />
				<asp:Parameter Name="defaultLanguage" Type="String" />
				<asp:Parameter Name="maxBatchGeneratedFileSize" Type="Int32" />
				<asp:Parameter Name="maxBatchSize" Type="Int32" />
				<asp:Parameter Name="numRecompilesBeforeAppRestart" Type="Int32" />
				<asp:Parameter Name="strict" Type="Boolean" />
				<asp:Parameter Name="tempDirectory" Type="String" />
				<asp:Parameter Name="urlLinePragmas" Type="Boolean" />
			</UpdateParameters>
		</asp:ObjectDataSource>
		<fieldset>
			<legend>compilation</legend>
			<asp:DetailsView ID="CompilationDetailsView" runat="server" 
				AutoGenerateRows="False" DataSourceID="CompilationDetailsViewDataSource" 
				DefaultMode="Edit" CellPadding="5" onitemupdated="CompilationDetailsView_ItemUpdated">
				<FieldHeaderStyle Font-Bold="False" />
				<Fields>
					<asp:BoundField DataField="AssemblyPostProcessorType" 
						HeaderText="AssemblyPostProcessorType" 
						SortExpression="AssemblyPostProcessorType" HtmlEncode="False" />
					<asp:CheckBoxField DataField="Batch" HeaderText="Batch" 
						SortExpression="Batch" />
					<asp:BoundField DataField="BatchTimeout" 
						HeaderText="BatchTimeout" HtmlEncode="False" />
					<asp:CheckBoxField DataField="Debug" HeaderText="Debug" 
						SortExpression="Debug" />
					<asp:BoundField DataField="DefaultLanguage" HeaderText="DefaultLanguage" 
						SortExpression="DefaultLanguage" HtmlEncode="False" />
					<asp:CheckBoxField DataField="Explicit" HeaderText="Explicit" ReadOnly="true"
						SortExpression="Explicit" />
					<asp:BoundField DataField="MaxBatchGeneratedFileSize" 
						HeaderText="MaxBatchGeneratedFileSize" 
						SortExpression="MaxBatchGeneratedFileSize" HtmlEncode="False" />
					<asp:BoundField DataField="MaxBatchSize" HeaderText="MaxBatchSize" 
						SortExpression="MaxBatchSize" HtmlEncode="False" />
					<asp:BoundField DataField="NumRecompilesBeforeAppRestart" 
						HeaderText="NumRecompilesBeforeAppRestart" 
						SortExpression="NumRecompilesBeforeAppRestart" HtmlEncode="False" />
					<asp:CheckBoxField DataField="Strict" HeaderText="Strict" 
						SortExpression="Strict" />
					<asp:BoundField DataField="TempDirectory" HeaderText="TempDirectory" 
						SortExpression="TempDirectory" HtmlEncode="False" />
					<asp:CheckBoxField DataField="UrlLinePragmas" HeaderText="UrlLinePragmas" 
						SortExpression="UrlLinePragmas" />
					<asp:CommandField ShowCancelButton="False" ShowEditButton="True" ButtonType="Button" />
				</Fields>
			</asp:DetailsView>
		</fieldset>
	</div>

	<div style="margin-left : 30px">
		<asp:ObjectDataSource ID="AssembliesDetailsViewDataSource" runat="server" 
			DeleteMethod="RemoveAssembly" InsertMethod="AddAssembly" 
			SelectMethod="GetAssembly" 
			
			TypeName="VioletDevelopmentLaboratory.Net.Web.Configuration.CompilationSectionManager">
			<DeleteParameters>
				<asp:Parameter Name="assembly" Type="String" />
			</DeleteParameters>
			<SelectParameters>
				<asp:ControlParameter ControlID="AssembliesGridView" Name="assembly" 
					PropertyName="SelectedValue" Type="String" />
			</SelectParameters>
			<InsertParameters>
				<asp:Parameter Name="assembly" Type="String" />
			</InsertParameters>
		</asp:ObjectDataSource>
		<asp:ObjectDataSource ID="AssembliesGridViewDataSource" runat="server" 
			SelectMethod="GetAssemblies" 
			
			TypeName="VioletDevelopmentLaboratory.Net.Web.Configuration.CompilationSectionManager"></asp:ObjectDataSource>
		<fieldset>
			<legend>assemblies</legend>
			<asp:DetailsView ID="AssembliesDetailsView" runat="server" AutoGenerateRows="False" 
				DataSourceID="AssembliesDetailsViewDataSource" DefaultMode="Insert" DataKeyNames="Assembly" 
				oniteminserted="AssembliesDetailsView_ItemInserted" 
				onitemdeleted="AssembliesDetailsView_ItemDeleted" CellPadding="5">
				<Fields>
					<asp:BoundField DataField="Assembly" HeaderText="Assembly" 
						SortExpression="Assembly" />
					<asp:CommandField ShowDeleteButton="True" ButtonType="Button"
						ShowInsertButton="True" />
				</Fields>
			</asp:DetailsView>
			<asp:GridView ID="AssembliesGridView" runat="server" 
				AutoGenerateColumns="False" DataKeyNames="Assembly" 
				DataSourceID="AssembliesGridViewDataSource" CellPadding="5" 
				onselectedindexchanging="AssembliesGridView_SelectedIndexChanging">
				<Columns>
					<asp:CommandField ShowSelectButton="True" />
					<asp:BoundField DataField="Assembly" HeaderText="Assembly" 
						SortExpression="Assembly" />
				</Columns>
				<SelectedRowStyle BackColor="SkyBlue" />
			</asp:GridView>
		</fieldset>
	</div>


	<div style="margin-left : 30px">
		<asp:ObjectDataSource ID="BuildProvidersDetailsViewDataSource" runat="server" 
			DeleteMethod="RemoveBuildProvider" InsertMethod="AddBuildProvider" 
			SelectMethod="GetBuildProvider" 
			TypeName="VioletDevelopmentLaboratory.Net.Web.Configuration.CompilationSectionManager" 
			UpdateMethod="ModifyBuildProvider">
			<DeleteParameters>
				<asp:Parameter Name="extension" Type="String" />
			</DeleteParameters>
			<UpdateParameters>
				<asp:Parameter Name="extension" Type="String" />
				<asp:Parameter Name="type" Type="String" />
			</UpdateParameters>
			<SelectParameters>
				<asp:ControlParameter ControlID="BuildProvidersGridView" Name="name" 
					PropertyName="SelectedValue" Type="String" />
			</SelectParameters>
			<InsertParameters>
				<asp:Parameter Name="extension" Type="String" />
				<asp:Parameter Name="type" Type="String" />
			</InsertParameters>
		</asp:ObjectDataSource>
		<asp:ObjectDataSource ID="BuildProvidersGridViewDataSource" runat="server" 
			SelectMethod="GetBuildProviders" 
			
			TypeName="VioletDevelopmentLaboratory.Net.Web.Configuration.CompilationSectionManager"></asp:ObjectDataSource>
		<fieldset>
			<legend>buildProviders</legend>
			<asp:DetailsView ID="BuildProvidersDetailsView" runat="server" 
				AutoGenerateRows="False" DataKeyNames="Extension" 
				DataSourceID="BuildProvidersDetailsViewDataSource" DefaultMode="Insert" 
				onitemdeleted="BuildProvidersDetailsView_ItemDeleted" 
				oniteminserted="BuildProvidersDetailsView_ItemInserted" 
				onitemupdated="BuildProvidersDetailsView_ItemUpdated" CellPadding="5">
				<Fields>
					<asp:BoundField DataField="Extension" HeaderText="Extension" ReadOnly="True" 
						SortExpression="Extension" />
					<asp:BoundField DataField="Type" HeaderText="Type" SortExpression="Type" />
					<asp:CommandField ShowDeleteButton="True" ShowEditButton="True" 
						ShowInsertButton="True" ButtonType="Button" />
				</Fields>
			</asp:DetailsView>
			<asp:GridView ID="BuildProvidersGridView" runat="server" 
				AutoGenerateColumns="False" CellPadding="5" DataKeyNames="Extension" 
				DataSourceID="BuildProvidersGridViewDataSource" 
				onselectedindexchanging="BuildProvidersGridView_SelectedIndexChanging">
				<Columns>
					<asp:CommandField ShowSelectButton="True" />
					<asp:BoundField DataField="Extension" HeaderText="Extension" 
						SortExpression="Extension" />
					<asp:BoundField DataField="Type" HeaderText="Type" SortExpression="Type" />
				</Columns>
				<SelectedRowStyle BackColor="SkyBlue" />
			</asp:GridView>
		</fieldset>
	</div>


	<div style="margin-left : 30px">
		<asp:ObjectDataSource ID="CodeSubDirectoriesDetailsViewDataSource" 
			runat="server" DeleteMethod="RemoveCodeSubDirectory" 
			InsertMethod="AddCodeSubDirectory" SelectMethod="GetCodeSubDirectory" 
			
			TypeName="VioletDevelopmentLaboratory.Net.Web.Configuration.CompilationSectionManager">
			<DeleteParameters>
				<asp:Parameter Name="directoryName" Type="String" />
			</DeleteParameters>
			<SelectParameters>
				<asp:ControlParameter ControlID="CodeSubDirectoriesGridView" Name="index" 
					PropertyName="SelectedIndex" Type="Int32" />
			</SelectParameters>
			<InsertParameters>
				<asp:Parameter Name="directoryName" Type="String" />
			</InsertParameters>
		</asp:ObjectDataSource>
		<asp:ObjectDataSource ID="CodeSubDirectoriesGridViewDataSource" runat="server" 
			SelectMethod="GetCodeSubDirectories" 
			
			TypeName="VioletDevelopmentLaboratory.Net.Web.Configuration.CompilationSectionManager"></asp:ObjectDataSource>
		<fieldset>
			<legend>codeSubDirectories</legend>
			<asp:DetailsView ID="CodeSubDirectoriesDetailsView" runat="server" 
				AutoGenerateRows="False" DataKeyNames="DirectoryName" 
				DataSourceID="CodeSubDirectoriesDetailsViewDataSource" DefaultMode="Insert" 
				oniteminserted="CodeSubDirectoriesDetailsView_ItemInserted" 
				onitemdeleted="CodeSubDirectoriesDetailsView_ItemDeleted" CellPadding="5">
				<Fields>
					<asp:BoundField DataField="DirectoryName" HeaderText="DirectoryName" 
						SortExpression="DirectoryName" />
					<asp:CommandField ShowDeleteButton="True" ShowInsertButton="True" 
						ButtonType="Button" />
				</Fields>
			</asp:DetailsView>
			<asp:GridView ID="CodeSubDirectoriesGridView" runat="server" 
				AutoGenerateColumns="False" CellPadding="5" DataKeyNames="DirectoryName" 
				DataSourceID="CodeSubDirectoriesGridViewDataSource" 
				onselectedindexchanging="CodeSubDirectoriesGridView_SelectedIndexChanging">
				<Columns>
					<asp:CommandField ShowSelectButton="True" />
					<asp:BoundField DataField="DirectoryName" HeaderText="DirectoryName" 
						ReadOnly="True" SortExpression="DirectoryName" />
				</Columns>
				<SelectedRowStyle BackColor="SkyBlue" />
			</asp:GridView>
		</fieldset>
	</div>


	<div style="margin-left : 30px">
		<asp:ObjectDataSource ID="ExpressionBuildersDetailsViewDataSource" 
			runat="server" DeleteMethod="RemoveExpressionBuilder" 
			InsertMethod="AddExpressionBuilder" SelectMethod="GetExpressionBuilder" 
			TypeName="VioletDevelopmentLaboratory.Net.Web.Configuration.CompilationSectionManager" 
			UpdateMethod="ModifyExpressionBuilder">
			<DeleteParameters>
				<asp:Parameter Name="expressionPrefix" Type="String" />
			</DeleteParameters>
			<UpdateParameters>
				<asp:Parameter Name="expressionPrefix" Type="String" />
				<asp:Parameter Name="type" Type="String" />
			</UpdateParameters>
			<SelectParameters>
				<asp:ControlParameter ControlID="ExpressionBuildersGridView" Name="name" 
					PropertyName="SelectedValue" Type="String" />
			</SelectParameters>
			<InsertParameters>
				<asp:Parameter Name="expressionPrefix" Type="String" />
				<asp:Parameter Name="type" Type="String" />
			</InsertParameters>
		</asp:ObjectDataSource>
		<asp:ObjectDataSource ID="ExpressionBuildersGridViewDataSource" runat="server" 
			SelectMethod="GetExpressionBuilders" 
			
			TypeName="VioletDevelopmentLaboratory.Net.Web.Configuration.CompilationSectionManager"></asp:ObjectDataSource>
		<fieldset>
			<legend>expressionBuilders</legend>
			<asp:DetailsView ID="ExpressionBuildersDetailsView" runat="server" 
				AutoGenerateRows="False" CellPadding="5" DataKeyNames="ExpressionPrefix" 
				DataSourceID="ExpressionBuildersDetailsViewDataSource" DefaultMode="Insert" oniteminserted="ExpressionBuildersDetailsView_ItemInserted" 
				onitemdeleted="ExpressionBuildersDetailsView_ItemDeleted" 
				onitemupdated="ExpressionBuildersDetailsView_ItemUpdated">
				<Fields>
					<asp:BoundField DataField="ExpressionPrefix" HeaderText="ExpressionPrefix" 
						ReadOnly="True" SortExpression="ExpressionPrefix" />
					<asp:BoundField DataField="Type" HeaderText="Type" SortExpression="Type" />
					<asp:CommandField ButtonType="Button" ShowDeleteButton="True" 
						ShowEditButton="True" ShowInsertButton="True" />
				</Fields>
			</asp:DetailsView>
			<asp:GridView ID="ExpressionBuildersGridView" runat="server" 
				AutoGenerateColumns="False" CellPadding="5" DataKeyNames="ExpressionPrefix" 
				DataSourceID="ExpressionBuildersGridViewDataSource" 
				onselectedindexchanging="ExpressionBuildersGridView_SelectedIndexChanging">
				<Columns>
					<asp:CommandField ShowSelectButton="True" />
					<asp:BoundField DataField="ExpressionPrefix" HeaderText="ExpressionPrefix" 
						SortExpression="ExpressionPrefix" />
					<asp:BoundField DataField="Type" HeaderText="Type" SortExpression="Type" />
				</Columns>
				<SelectedRowStyle BackColor="SkyBlue" />
			</asp:GridView>
		</fieldset>
	</div>
</asp:Content>